'''
1、普通复制：指向同一空间
      data1 = data
   浅拷贝：指向不同空间
      data1 = copy.copy(data)
   深拷贝：
      data1 = copy.deepcopy(data)
'''
import copy
# a = [1, 2, 3]
# b = [11, 22, 33]
# c = [a, b]
# 普通复制（列表为可变类型）- 空间相同
# d = c
# print(id(c))
# print(id(d))
'''
# 浅拷贝 - 空间不同
d = copy.copy(c)
print(id(c))
print(id(d))

# 浅拷贝-深层数据 - 空间相同
d = copy.copy(c)
print(id(a))
print(id(c[0]))
print(id(d[0]))
'''
# 浅拷贝-不可变类型（元组为不可变类型）- 空间相同
# a = (1, 2, 3)
# b = (11, 22, 33)
# c = (a, b)
# d = copy.copy(c)
# print(id(c))
# print(id(d))
'''
# 深拷贝-深层数据 - 空间不同
a = [1, 2, 3]
b = [11, 22, 33]
c = [a, b]
d = copy.deepcopy(c)
print(id(a))
print(id(c[0]))
print(id(d[0]))
'''
# 深拷贝-不可变类型 - 空间相同
a = (1, 2, 3)
b = (11, 22, 33)
c = (a, b)
d = copy.deepcopy(c)
print(id(c))
print(id(d))